/**
 * 组织
 * 每一个User都有一个组织
 * 职称、职位、调查公司、员工都按照组织分类
 */

const sequelize = require('../db')
const { DataTypes } = require('sequelize')
const User = require('../User')

const Group = sequelize.define('Group', {
    id: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true },
    name: { type: DataTypes.STRING, allowNull: false },

})
User.hasMany(Group)
Group.belongsTo(User)
module.exports = Group